package com.training.java.core.collections.laptop.post15;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.training.java.core.collections.laptop.pre15.Laptop;

public class LaptopListDemo {

	public static void main(String[] args)
	{
		Laptop laptop1= new Laptop("Hp","pavillion","intel core");
		Laptop laptop2= new Laptop("Dell","inspiron","Quad core");
		Laptop laptop3= new Laptop("Acer","aspire","Dual core");
		Laptop laptop4= new Laptop();
		

		laptop1.setOs("windows");
		laptop2.setOs("Linux");
		laptop3.setOs("Mac");
		
		
		List<Laptop> listOfLaptops = new ArrayList<Laptop>();
		
		listOfLaptops.add(laptop2);
		listOfLaptops.add(laptop1);
		listOfLaptops.add(laptop3);
		listOfLaptops.add(laptop3);
		listOfLaptops.add(laptop4);
		
		
		for(Laptop aLaptop : listOfLaptops)
		{
			System.out.println("company: "+ aLaptop.getCompany() );
			System.out.println("model: "+ aLaptop.getModel() );
			System.out.println("processor: "+ aLaptop.getProcessor() );
			System.out.println("OS: "+ aLaptop.getOs() );
			System.out.println("*************************" );
		}
		
		
	}

}
